
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>外勤查询</title>

    <link rel="stylesheet" type="text/css" href="mode/weui/weui.min.css"/>
    <link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="webmain/css/rui.css">
    <script type="text/javascript" src="js/base64-min.js"></script>

    <script type="text/javascript" src="webmain/we/ying/dist/jquery.min.js"></script>
    <script type="text/javascript" src="webmain/we/ying/ying.js"></script>

    <script type="text/javascript" src="webmain/we/ying/dist/dropload.js"></script>
    <script type="text/javascript" src="webmain/we/ying/dist/dropload.min.js"></script>
    <link rel="stylesheet" href="webmain/we/ying/dist/dropload.css">

    <style>

        body,html{background-color:#f1f1f1;height: 100%;background-color: rgb(230,230,230);}

        .weui_tab{position:fixed;bottom:0px;width:100%;height:50px}
        .weui_navbar_item{font-size:16px;}
        .weui_navbar_item span{position:absolute;left:3px;top:3px}
        .weui_navbar_item:active{background-color:#f5f5f5}




        ul li{width:90%; margin-left: 5%; margin-bottom: 20px; border-radius:5px; display: flex;flex-direction:column; background-color: white;margin-top: 10px}
        .div1{justify-content: space-between; display:flex; border-radius: 5px 5px 0px 0px; background-color: rgb(27,205,138)}

        .div2{display: flex;flex-direction:row; border: 1px rgb(223,223,223) solid; border-bottom: 1px; border-left: 0px;border-right: 0px; padding:3px 10px;justify-content: space-between;}
        /*li div{display: flex;flex-direction:row;justify-content: space-between;}*/
        /*.span1{display: inline-block; width: 60%;overflow: hidden;}*/
        /*.span2{margin-top: 5px}*/

    </style>
    <script>



        var json ;

        var json1 = <?=json_encode($lowidArr)?>;

        var dropload;

        var refresh = 0;

        var page = 0;

        var ulhtml = '';


        window.onload=function(){

            load();


            if(!json1.length){


               $("#footerdiv").hide();
            }

        }

        function load(){


          var  dropload = $('.element').dropload({

                scrollArea : window,

                loadDownFn : function(me){


                    $.ajax({

                        type: 'POST',
                        //url: "http://oa.wxlion.com/index.php?d=we&m=wq&a=wqcx",
                         url: "http://localhost/oa/public_html/?d=we&m=wq&a=wqcx",

                        data: {

                            page:page++

                        },
                        datatype: "json",
                        success: function(result) {

                            var arr = eval(result);

                            json = arr;

                            if(json.length < 5){

                                dropload.lock('down');
                                me.noData();

                            }

                            me.resetload();    // 每次数据加载完，必须重置

                            if(json.length){

                                mywq();
                            }

                        },
                        //调用出错执行的函数
                        error: function(error1) {


                        }
                    });
                }

            });
        }


        function mywq(num){



            for (var i =0;i<json.length;i++){

                var j = json[i];
                var time = j.optdt.substring(0,10);

                var time1 = j.optdt.slice(11);


                ulhtml += ' <li onclick ="wqcontent('+j.id+')" > <div class="div1"><span style="margin:5px 10px ">' + time + '</span><span style="margin:3px 10px ">外勤</span></div><span style="margin: 10px">' + j.explain + '</span> <div class="div2"> <span>提交时间:&nbsp' + time1 + '</span>  </li>';


            }
            if(!json.length){ ulhtml = '<span style="margin: 10px">没有外勤记录</span>'}

            $("#kqul").html(ulhtml);
        }

        //下属外勤列表

        function wqdetail(id){


            var url='index.php?a=detail&m=wq&d=we&uid='+id+'';

            location.href = url;

        }

        function wqcontent(id){

            var url='index.php?a=content&m=wq&d=we&id='+id+'';

            location.href = url;
        }

        function lowerwq(){

            var url='index.php?a=lowerwq&m=wq&d=we';

            location.href = url;
        }

    </script>

</head>

<div class="element" style="width: 100%;  margin-top: 10px; overflow: auto; margin-bottom: 10px">

    <ul id="kqul" >


    </ul>



</div>




<div id="footerdiv" style="height:50px;overflow:hidden">
    <div  style="z-index:5" class="weui_tab">
            <div class="weui_navbar weui_tabbar">

                <div class="weui_navbar_item" onclick="lowerwq()">下属外勤</div>
            </div>
       </div>
</div>


</html>